<Styles xmlns="https://github.com/avaloniaui"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Style Selector="TreeView">
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="0" />
    </Style>
    <Style Selector="TreeViewItem">
        <Setter Property="Padding" Value="5" />
    </Style>

    <Style Selector="TreeViewItem:selected /template/ Border#SelectionBorder">
        <Setter Property="Background" Value="{DynamicResource ThemeAccentBrush}"/>
    </Style>
    <Style Selector="TreeViewItem:selected /template/ Border#SelectionBorder:focus">
        <Setter Property="Background" Value="{DynamicResource ThemeAccentBrush}"/>
    </Style>
    <Style Selector="TreeViewItem:selected /template/ Border#SelectionBorder:pointerover">
        <Setter Property="Background" Value="{DynamicResource ThemeAccentBrush}"/>
    </Style>
    <Style Selector="TreeViewItem:selected /template/ Border#SelectionBorder:pointerover:focus">
        <Setter Property="Background" Value="{DynamicResource ThemeAccentBrush}"/>
    </Style>
    
    <Style Selector="TreeViewItem:selected > TextBlock">
        <Setter Property="Foreground" Value="{DynamicResource HighlightForegroundBrush}"/>
    </Style>
    <Style Selector="TreeViewItem /template/ ToggleButton#expander">
        <Setter Property="Template">
            <ControlTemplate>
                <Border Background="Transparent"
                        Width="16"
                        Height="12"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center">
                    <Path Fill="{DynamicResource ThemeForegroundBrush}"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Data="M 0 2 L 4 6 L 0 10 Z"/>
                </Border>
            </ControlTemplate>
        </Setter>
    </Style>
    <Style Selector="TreeViewItem:selected /template/ ToggleButton#expander">
        <Setter Property="Template">
            <ControlTemplate>
                <Border Background="Transparent"
                        Width="16"
                        Height="12"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center">
                    <Path Fill="#ffffff"
                          HorizontalAlignment="Center"
                          VerticalAlignment="Center"
                          Data="M 0 2 L 4 6 L 0 10 Z"/>
                </Border>
            </ControlTemplate>
        </Setter>
    </Style>
</Styles>